package com.ruoyi.kafka.utils;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class KafkaUtils {
    @KafkaListener(topics = {"topictest1"})
    public void message(String  testJson){
        //消费的那个topic partition的消息,打印出消息内容
        System.err.println(testJson);
        System.out.println(111);

    }

    @KafkaListener(topics = {"topictest1"})
    public void message1(String testJson) {
        //消费的那个topic partition的消息,打印出消息内容
        System.err.println(testJson);
        System.out.println(222);
    }
}
